package com.vunguyen.model;
// Generated Dec 27, 2014 4:28:42 PM by Hibernate Tools 3.6.0


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * Phieudoiphong generated by hbm2java
 */
@Entity
@Table(name="phieudoiphong"
    ,catalog="qlkhoacntt"
)
public class Phieudoiphong  implements java.io.Serializable {


     private int idPhieu;
     private Phieudangky phieudangky;
     private String phongDoi;

    public Phieudoiphong() {
    }

    public Phieudoiphong(Phieudangky phieudangky, String phongDoi) {
       this.phieudangky = phieudangky;
       this.phongDoi = phongDoi;
    }
   
     @GenericGenerator(name="generator", strategy="foreign", parameters=@Parameter(name="property", value="phieudangky"))@Id @GeneratedValue(generator="generator")

    
    @Column(name="idPhieu", unique=true, nullable=false)
    public int getIdPhieu() {
        return this.idPhieu;
    }
    
    public void setIdPhieu(int idPhieu) {
        this.idPhieu = idPhieu;
    }

@OneToOne(fetch=FetchType.EAGER)@PrimaryKeyJoinColumn
    public Phieudangky getPhieudangky() {
        return this.phieudangky;
    }
    
    public void setPhieudangky(Phieudangky phieudangky) {
        this.phieudangky = phieudangky;
    }

    
    @Column(name="PhongDoi", nullable=false, length=5)
    public String getPhongDoi() {
        return this.phongDoi;
    }
    
    public void setPhongDoi(String phongDoi) {
        this.phongDoi = phongDoi;
    }




}


